#include<stdio.h>

int main(){
  int n = 0;
  int* prime = NULL;
  int x = 0,i = 0,m = 0,s = 1;
  scanf("%d",&n);
  if(n <= 10){
    printf("-1\n");
    return 0;
  }
  
  x = ((int)(n/2) + 1);
  prime = (int*)malloc(sizeof(int) * x);
  memset(prime,0,sizeof(int) * x);
  prime[0] = 2;
  for(i = 3;i < n;i += 2){
    for(m = 0;m < x;++m){
      if(prime[m] && (i % prime[m] == 0)){
        goto end;
      }
    }
    prime[s] = i;
    ((i + 2) >= n )?printf("%d\n",i):(i > 10) && printf("%d ",i);
    ++s;
  end:
    continue;
  }
  if(s <= 4){
    printf("-1\n");
  }
  free(prime);
  return 0;
}
